// import com.alibaba.druid.sql.ast.statement.SQLSelect;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

#include "MySqlShowPlanCacheStatement.h"
#include "../../../../ast/statement/SQLSelect.h"
#include "../../visitor/MySqlASTVisitor.h"

MySqlShowPlanCacheStatement::MySqlShowPlanCacheStatement()
{
}

MySqlShowPlanCacheStatement::MySqlShowPlanCacheStatement(SQLSelect_ptr select)
{
  setSelect(select);
}

void MySqlShowPlanCacheStatement::accept0(MySqlASTVisitor_ptr v)
{
  if (v->visit(SharedObject(MySqlShowPlanCacheStatement)))
  {
    if (select != nullptr)
    {
      select->accept(v);
    }
  }
  v->endVisit(SharedObject(MySqlShowPlanCacheStatement));
}

SQLSelect_ptr MySqlShowPlanCacheStatement::getSelect()
{
  return select;
}

void MySqlShowPlanCacheStatement::setSelect(SQLSelect_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlShowPlanCacheStatement));
  }
  this->select = x;
}
